package com.liuxin.zhiyuan.shujuzhongxin.controller;

import java.util.Arrays;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.liuxin.zhiyuan.shujuzhongxin.domain.po.SchoolScoreLinesEntity;
import com.liuxin.zhiyuan.shujuzhongxin.service.SchoolScoreLinesService;
import com.liuxin.common.utils.PageUtils;
import com.liuxin.common.utils.R;



/**
 * 院校历年分数线表
 *
 * @author zsl
 * @email 1301966496@qq.com
 * @date 2025-10-28 23:02:03
 */
@RestController
@RequestMapping("shujuzhongxin/schoolscorelines")
public class SchoolScoreLinesController {
    @Autowired
    private SchoolScoreLinesService schoolScoreLinesService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    //@RequiresPermissions("shujuzhongxin:schoolscorelines:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = schoolScoreLinesService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info")
    //@RequiresPermissions("shujuzhongxin:schoolscorelines:info")
    public R info(@RequestParam("id") Integer id){
		SchoolScoreLinesEntity schoolScoreLines = schoolScoreLinesService.getById(id);

        return R.ok().put("schoolScoreLines", schoolScoreLines);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    //@RequiresPermissions("shujuzhongxin:schoolscorelines:save")
    public R save(@RequestBody SchoolScoreLinesEntity schoolScoreLines){
		schoolScoreLinesService.save(schoolScoreLines);

        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
   //@RequiresPermissions("shujuzhongxin:schoolscorelines:update")
    public R update(@RequestBody SchoolScoreLinesEntity schoolScoreLines){
		schoolScoreLinesService.updateById(schoolScoreLines);

        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    //@RequiresPermissions("shujuzhongxin:schoolscorelines:delete")
    public R delete(@RequestBody Integer[] ids){
		schoolScoreLinesService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
